package servlet;

import entity.User;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/jstl")
public class JSTLServlet extends HttpServlet {

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setAttribute("content1", null);
        request.setAttribute("content2", "<a href='https://www.baidu.com/'>百度</a>");
        request.getRequestDispatcher("jstl-01.jsp").forward(request,response);

        User user = new User(10086, "奥德飙", "aoDeBiao", '男');
        request.setAttribute("loginUser", user);

        request.getRequestDispatcher("jstl-02.jsp").forward(request,response);


    }
}
